$mainColor: #EB3D97;
$transitionTime: 0.5s;

* {
    outline: none;
}

a {
    color: black;
    text-decoration: none;
}

html,
body,
.main {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

.main {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent url("../images/background.png") no-repeat center center;
    background-size: cover;
}

// 注册盒子样式
.register-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 450px;
    height: 700px;
    background-color: white;
    border-radius: 8px;

    // 注册标题样式
    .register-title {
        font-weight: 100;
        font-size: 32px;
        color: black;
        letter-spacing: 1rem;
        margin-right: -1rem;
        margin-bottom: 32px;
    }

    // 注册表单样式
    .register-form {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;

        :nth-child(n) {
            margin-bottom: 12px;
        }

        // 用户输入框盒子样式
        .username-box,
        .password-box,
        .phone-box,
        .code-box {
            display: flex;
            flex-direction: column;
            width: 80%;
            color: black;

            label {
                font-size: 16px;
                margin-bottom: 8px;
            }
        }

        // 验证码输入框盒子样式
        .code-box {
            position: relative;

            // 验证码输入框样式
            .code {
                width: calc(100% - 190px);
                padding-right: 140px;
            }

            // 验证码按钮样式
            .code-button {
                display: block;
                position: absolute;
                top: 31px;
                right: 10px;
                width: 120px;
                padding: 0;
                background-color: transparent;
                border: none;
                cursor: pointer;
                transition: color $transitionTime;

                &:hover {
                    color: $mainColor;
                }

                &:disabled {
                    color: rgb(200, 200, 200);
                    cursor: not-allowed;
                }
            }
        }

        // 用户名输入框样式
        .username {
            background: white url("../images/user.png") no-repeat;
            background-size: 32px;
            background-position: 8px center;
        }

        // 密码输入框样式
        .password {
            background: white url("../images/password.png") no-repeat;
            background-size: 32px;
            background-position: 8px center;
        }

        // 手机输入框样式
        .phone {
            background: white url("../images/phone.png") no-repeat;
            background-size: 32px;
            background-position: 8px center;
        }

        // 验证码输入框样式
        .code {
            background: white url("../images/message.png") no-repeat;
            background-size: 32px;
            background-position: 8px center;
        }

        // 输入框样式
        input {
            width: calc(100% - 70px);
            height: 50px;
            padding: 0px 20px;
            padding-left: 50px;
            color: black;
            font-size: 20px;
            background-color: rgba($color: #FFF, $alpha: 0.5);
            border: none;
            border-bottom: 1px solid black;
            transition: border $transitionTime;

            &:focus {
                border-bottom: 1px solid $mainColor;
            }

        }

        // 注册按钮样式
        .register-button {
            padding: 0;
            width: 80%;
            color: white;
            background: transparent url("../images/background.png") no-repeat top;
            background-size: 100% auto;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: opacity $transitionTime;

            &:hover {
                opacity: 0.5;
            }
        }
    }

    // 链接块样式
    .link {
        display: flex;
        justify-content: space-between;
        width: 80%;

        a {
            color: black;
            transition: color $transitionTime;

            &:hover {
                color: $mainColor;
            }
        }
    }
}